<html	xmlns="http://www.w3.org/1999/xhtml"
		xmlns:jsp="http://java.sun.com/JSP/Page"
		xmlns:f="http://java.sun.com/jsf/core"      
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:c="http://java.sun.com/jsp/jstl/core"
		xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
		xmlns:ui="http://java.sun.com/jsf/facelets">
      
    <h:head>
        <title>Liste films acheté</title>
		<link rel="stylesheet" href="../styles/style.css" />
    </h:head>
	
	<h:body>
		<h:panelGroup rendered="#{loginBean.loginSucces}">
	    <ui:include src="../includes/header.xhtml" />
    	<ui:include src="../includes/menu.xhtml" />
    	
    	<div id="content">
	    	<h2>Modifier Film</h2>
			<h:form>
			<div id="liste_films">
				<c:forEach var="film" items="#{listeFilmsBean.filmsAchetes}">
					<div class="film">
						<fieldset>
						<legend>#{film.titre}</legend>
						<!-- div class="titre_film">#{film.titre}</div-->
						<div class="synopsis_film elem_film">#{film.synopsis}</div>
						<div class="date_film elem_film">Date de sortie :
						<h:outputText value="#{film.dateSortie}">
								<f:convertDateTime type="date" pattern="yyyy/MM/dd" />
						</h:outputText>
						</div>
						<div class="duree_film elem_film">Durée : #{film.duree} minutes</div>
						<div class="real_film elem_film">Réalisé par : #{film.realisateur}</div>
						<div class="acteurs_film elem_film">Avec : #{film.acteurs}</div>
						<div class="genre_film elem_film">Genre : #{film.genre}</div>
						<div class="nationalite_film elem_film">Nationalité : #{film.nationalite}</div>
						<div class="rating_film elem_film">
						<h:outputText value="#{film.rating}">
							<f:convertNumber pattern="#0.0" maxFractionDigits="1" maxIntegerDigits="1" />
						</h:outputText>
						 / 5</div>
						<div class="clear"></div> 
						
						<div class="lienModifierFilm">
							<h:commandButton value="Modifier ce film" action="#{listeFilmsBean.outcome}">
									<f:param name="idFilm" value="#{film.id}" />
									<!--f:setPropertyActionListener target="#{modifierFilmBean.idFilm}" value="#{film.id}" /-->
							</h:commandButton>
						</div>
						</fieldset>
					</div>
				</c:forEach>
			</div>
			</h:form>
		</div>
		<ui:include src="../includes/footer.xhtml" />
		
    	</h:panelGroup>
    	
    	<h:panelGroup rendered="#{!loginBean.loginSucces}">
			<ui:include src="../includes/authError.xhtml" />	
    	</h:panelGroup>
	</h:body>
</html>